<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page language="java" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title></title>
  <link href="<%=basePath %>web/index_css.css" rel="stylesheet" type="text/css" />
  <script language="javascript">  
		function fsubmit(obj){
		  var pattern =/^[a-zA-Z0-9_\-]{1,}@[a-zA-Z0-9_\-]{1,}\.[a-zA-Z0-9_\-.]{1,}$/;
		  if (obj.realname.value==""){alert("对不起,你还没有输入你的真实姓名！");obj.realname.focus();return false;} 
          if (obj.nickname.value==""){alert("对不起,你还没有输入你的昵称！");obj.nickname.focus();return false;} 
          if (obj.nation.value==""){alert("对不起,请输入你的籍贯！");obj.nation.focus();return false;}
          if (obj.birthday.value==""){alert("对不起,请选择你的出生年月！");obj.birthday.focus();return false;}
          if (obj.cardid.value==""){alert("对不起,请认真填写你的身份证号码！");obj.cardid.focus();return false;}
          if (obj.cardid.value.length>20){alert("对不起,身份证号码长度大于20位了！");obj.cardid.focus();return false;}
          if (obj.cardid.value.length<15){alert("你填写的身份证号少于15位数！");obj.cardid.focus();return false;}
          if (obj.linktel.value==""){alert("请填写你的联系电话，以便我们能够及时联系到你！");obj.linktel.focus();return false;} 
          if (obj.entime.value==""){alert("请选择你的入学时间！");obj.entime.focus();return false;}
          if (obj.zhuanye.value==""){alert("请填写你所学的专业！");obj.zhuanye.focus();return false;}
          if (obj.height.value==""){alert("请填你的身高！");obj.height.focus();return false;}
          if (obj.height.value.length>3){alert("请认真填写你的身高！");obj.height.focus();return false;}
          if (isNaN(obj.height.value)){alert("你的身高不是数字！");obj.height.focus();return false;}
          if (obj.question.value==""){alert("请填写找回密码问题！");obj.question.focus();return false;}
          if (obj.answer.value==""){alert("请填写找回密码问题的答案！");obj.answer.focus();return false;}
          if (obj.remark1.value==""){alert("请填写你的邮箱地址,以便找回密码时使用！");obj.remark1.focus();return false;}
          if (!pattern.exec(obj.remark1.value)) {alert("请填写正确的邮箱地址!");obj.remark1.focus();return false;}           
		  obj.submit();
		}
	</script>
	<script language="javascript">  
		function updatepwd(obj){
          if (obj.upass.value==""){alert("请填你的登录密码！");obj.upass.focus();return false;}
          if (obj.upass.value.length<6){alert("你填写的登录密码少于六位数！");obj.upass.focus();return false;}
          if (obj.upass1.value==""){alert("请填你的确认密码！");obj.upass1.focus();return false;}
          if (obj.upass.value!=obj.upass1.value){alert("你的密码和确认密码不一致！");obj.upass1.focus();return false;}     
		  obj.submit();
		}
	</script>
 </head>
 <body>
  <c:if test="${!empty msg}">
     <script type="text/javascript">
         alert("${msg}");  
     </script>
     <c:remove var="msg" scope="session"/>
   </c:if>
 <form name="form2" id="form2" method="post" action="<%=basePath %>updateupass.html">
  <table border="0" cellpadding="0" cellspacing="5" style="font-size: 14px; text-align: left;" width="690px">
     <tr> 
      <td style="font-size: 16px;color: #FD8305; font-weight: bold;"> 
          密码修改 
      </td>
    </tr>
    <tr> 
      <td>
         <input name="member.mid" type="hidden" value="${myinfo.mid }"/>
          现在密码：<input type="password" name="member.upass" id="upass"/><span class="STYLE4"> * 请填写新密码</span>
      </td>
    </tr>
    <tr> 
      <td>
          确认密码：<input type="password" name="upass1" id="upass1"/><span class="STYLE4"> * 确认密码必须与上面的新密码一致</span>
      </td>
    </tr>
    <tr> 
      <td height="20"> 
        <input type="button"  value="修&nbsp;&nbsp;改" onmousedown="return updatepwd(form2);" style="font-size: 15px;"/>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="reset"  value="重&nbsp;&nbsp;填" />
      </td>
    </tr>
  </table>
 </form>
 <form name="form1" id="form1" method="post" action="<%=basePath %>updatemyinfo.html">
			<table border="0" cellpadding="0" cellspacing="5" style="text-align: left;" width="690px">
			    <tr> 
			      <td colspan="4" style="font-size: 16px;color: #FD8305; font-weight: bold;">
                     我的资料
                  </td>
			    </tr>
				<tr>
					<td align="left">
						<ul style="list-style: none; margin: 0px;font-size: 16px;">
							<li style="height: 23px;">
								真实姓名：
								<input name="member.mid" type="hidden" id="mid" value="${myinfo.mid }"/>
								<input name="member.realname" type="text" id="realname" value="${myinfo.realname }" size="15" />
								<span class="STYLE4"><font color="red">*</font>请填写您的真实姓名</span><br />
							</li>
							<li style="height: 23px;">
								昵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称：
								<input name="member.nickname" type="text" id="nickname" value="${myinfo.nickname }" size="16" />
								<span class="STYLE4"><font color="red">*</font>在网站中显示的昵称</span><br />
							</li>
							<li style="height: 23px;">
								性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别：
								<c:if test="${'男' eq myinfo.sex}">
								 <input type="radio" name="member.sex" value="男" checked="checked"/>
								男
								<input type="radio" name="member.sex" value="女" />
								女
								</c:if>
								<c:if test="${'女' eq myinfo.sex}">
								 <input type="radio" name="member.sex" value="男" />
								男
								<input type="radio" name="member.sex" value="女" checked="checked"/>
								女
								</c:if><span class="STYLE4"><font color="red">*</font>您的性别</span><br />
							</li>
							<li style="height: 23px;">
								籍&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;贯：
								<input name="member.nation" type="text" id="nation" value="${myinfo.nation }" size="15" />
								<span class="STYLE4"><font color="red">*</font>您的籍贯 如：四川南充</span><br />
							</li>
							<li style="height: 23px;">
								出生年月：
								
								<input type="text" name="member.birthday" size="18" onclick="showcalendar(event,this);" onfocus="showcalendar(event, this);if(this.value=='0000-00-00')this.value=''" readonly="readonly" value="<fmt:formatDate value="${myinfo.birthday }" pattern="yyyy-MM-dd"/>" id="birthday"/><span class="STYLE4"><font color="red">*</font>您的出生年月</span><br />
							</li>
							<li style="height: 23px;">
								身份证号：
								<input type="text" name="member.cardid" value="${myinfo.cardid }" size="25" id="cardid"/><span class="STYLE4"><font color="red">*</font>请认真填写身份证号</span><br />
							</li>
							<li style="height: 23px;">
								联系电话：
								<input type="text" name="member.linktel" size="18" value="${myinfo.linktel }" id="linktel"/><span class="STYLE4"><font color="red">*</font>很重要，我们有工作时要通过电话通知您</span><br />
							</li>
							<li style="height: 23px;">
								入学时间：
								<input type="text" name="member.entime" size="18" onclick="showcalendar(event,this);" onfocus="showcalendar(event, this);if(this.value=='0000-00-00')this.value=''" value="<fmt:formatDate value="${myinfo.entime }" pattern="yyyy-MM-dd"/>" id="entime"/>
								<span class="STYLE4"><font color="red">*</font>请选择入学时间</span><br />
							</li>
							<li style="height: 23px;">
								所学专业：
								<input type="text" name="member.zhuye" value="${myinfo.zhuye }" id="zhuanye" size="25" />
								<span class="STYLE4"><font color="red">*</font>您在学校所学的专业</span><br />
							</li>
							<li style="height: 23px;">
								身&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;高：
								<input name="member.height" type="text" id="height" value="<fmt:formatNumber value="${myinfo.height }" pattern="#"></fmt:formatNumber>" size="10" />
								<span class="STYLE4">cm(厘米) <font color="red">*</font>商家工作有时有身高要求，请如实填写。</span><br />
							</li>
							<li style="height: 23px;">
								特&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;长：
								<input name="member.techang" type="text" id="techang" value="${myinfo.techang }" size="35" />
								<span class="STYLE4"> 请认真填写</span><br />
							</li>
							<li style="height: 23px;">
								爱&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;好：
								<input name="member.likes" type="text" id="likes" value="${myinfo.likes }" size="35" />
								<span class="STYLE4">  请认真填写</span><br />
							</li>
							<li style="height: 23px;">
								座&nbsp;右&nbsp;铭&nbsp;：
								<input name="member.mcontent" type="text" id="mcontent" value="${myinfo.mcontent }" size="35" />
								<span class="STYLE4">  请认真填写</span><br />
							</li>
							<li style="height:23px;">
								有健康证：
								<c:choose>
								 <c:when test="${'有' eq myinfo.healthly}">
								  <input type="radio" name="member.healthly" value="有" checked="checked" />
								   有
								  <input type="radio" name="member.healthly" value="无" />
								   无
								 </c:when>
								 <c:otherwise>
								   <input type="radio" name="member.healthly" value="有" />
								   有
								   <input type="radio" name="member.healthly" value="无" checked="checked" />
								   无
								 </c:otherwise>
								</c:choose>
								<span class="STYLE4"><font color="red">*</font>商家有时要求有健康证。</span><br />
							</li>
							<li style="height: 23px;">
								密保问题：
								<input name="member.question" type="text" id="question" value="${myinfo.question }" size="25" />
								<span class="STYLE4"><font color="red">*</font>忘记密码是要回答的问题</span><br />
							</li>
							<li style="height: 23px;">
								密保答案：
								<input name="member.answer" type="text" id="answer" value="${myinfo.answer }" size="25" />
								<span class="STYLE4"><font color="red">*</font>找回密码时的答案</span><br />
							</li>
							<li style="height: 23px;">
								密保邮箱：
								<input name="member.remark1" type="text" id="remark1" value="${myinfo.remark1 }" size="25" />
								<span class="STYLE4"><font color="red">*</font>很重要,我们将发送密码到您的邮箱</span><br />
							</li>
							<li style="height: 23px">
								信息备注：
								<input type="text" name="member.remark2" value="${myinfo.remark2 }" size="35"/>
							</li>
						</ul>
					</td>
				</tr>
				<tr>
					<td align="left" style="font-size: 16px">
						<input type="button"  value="修&nbsp;&nbsp;改" onmousedown="return fsubmit(form1);" style="font-size: 15px;"/>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="reset"  value="取&nbsp;&nbsp;消" />
					</td>
				</tr>

			</table>
		</form> 
</body>   
</html>                     